package ModelLayer;

import java.util.ArrayList;

/**
 * Write a description of class AdressBook here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class AddressBook
{
    
    
    private ArrayList<Person> addressCollection; // dette er ArrayListen for Person.
    
    private static AddressBook instance; 

    /**
     * Constructor for objects of class AdressBook
     */
    public AddressBook()
    {
        addressCollection = new ArrayList<Person>(); 
    }

    private static AddressBook getInstance()
    {
        if(instance == null){
            instance = new AddressBook();
        }
            return instance; 
    }
    
    public void addPerson(Person newPerson)
    {
        addressCollection.add(newPerson);
    }
}
